@extends('default.layouts.vice_head_foot')
@section('title'){{ $newsInfo->title.'-'.Site::get('webname') }} @endsection
@section('insert_css')
{{--添加样式表--}}
<link rel="stylesheet" href="{{asset('/default/css/index/vice_public.css')}}">
<link rel="stylesheet" href="{{asset('/default/css/index/newsinfo.css')}}">
<link rel="stylesheet" href="{{asset('/default/css/index/station.css')}}">

@endsection
@section('content')
    {{--副页菜单模版--}}
     @include('default.layouts.index_vice_mune')
    {{--分站列表--}}
    @include('default.layouts.station')
    {{--内容区显示区--}}
    <div class="vicecontent">
        {{--阴影线--}}
        <div class="shadow_line"></div>
        <div class="content">
            {{--latest news and job labels--}}
            <div class="news-info">
                <div class="left">
                    <div class="title">
                        <div class="title_content" @if($newsInfo->style != '') style="color:{{ $newsInfo->style }}"@endif>{{ $newsInfo->title }}</div>
                        <div class="title_info">
                            <span class="title_time">{{ $newsInfo->updated_at }}</span>
                            <span class="title_read">阅读量：{{ $newsInfo->readnum }}</span>
                            @if(!empty($newsInfo->source))<span class="title_source">{{ '来源：'.$newsInfo->source}}</span>@endif
                            @if(!empty($newsInfo->publisher))<span class="title_publisher">{{ '作者：'.$newsInfo->publisher}}</span>@endif
                        </div>
                    </div>
                    <div class="info">{!! $newsInfo->editorValue !!}</div>
                </div>{{--end second left--}}
                <div class="right">
                    {{--second right search--}}
                    <div class="search">
                        <form action="{{  route('news') }}" method="post" name="newsForm" id="newsForm">
                            {{csrf_field()}}
                            <span><input type="text" name="search" placeholder="请输入关键字"><em></em></span>
                        </form>
                    </div>
                    {{--second right job label--}}
                    <div class="title">
                        <span>求职标签</span>
                    </div>
                    <div class="label-list">
                        <ul>
                            <li><a href="{{  route('news') }}?search=销售">销售</a></li>
                            <li><a href="{{  route('news') }}?search=会计">会计</a></li>
                            <li><a href="{{  route('news') }}?search=计算机">计算机</a></li>
                            <li><a href="{{  route('news') }}?search=行政">行政</a></li>
                            <li><a href="{{  route('news') }}?search=物流">物流</a></li>
                            <li><a href="{{  route('news') }}?search=传媒">传媒</a></li>
                            <li><a href="{{  route('news') }}?search=法律">法律</a></li>
                            <li><a href="{{  route('news') }}?search=教师">教师</a></li>
                            <li><a href="{{  route('news') }}?search=编辑">编辑</a></li>
                            <li><a href="{{  route('news') }}?search=人力资源">人力资源</a></li>
                            <li><a href="{{  route('news') }}?search=主管">主管</a></li>
                            <li><a href="{{  route('news') }}?search=经理">经理</a></li>
                            <li><a href="{{  route('news') }}?search=化工">化工</a></li>
                            <li><a href="{{  route('news') }}?search=带薪年假">带薪年假</a></li>
                            <li><a href="{{  route('news') }}?search=电子商务">电子商务</a></li>
                            <li><a href="{{  route('news') }}?search=有年终奖">有年终奖</a></li>
                            <li><a href="{{  route('news') }}?search=酒店">酒店</a></li>
                            <li><a href="{{  route('news') }}?search=产品经理">产品经理</a></li>
                            <li><a href="{{  route('news') }}?search=双休">双休</a></li>
                            <li><a href="{{  route('news') }}?search=五险一金">五险一金</a></li>
                        </ul>
                    </div>
                    {{--second right info category--}}
                    <div class="title">
                        <span>讯息分类</span>
                    </div>
                    <div class="info">
                        <ul>
                            @if(count($secondClass) > 0)
                                @foreach($secondClass as $k => $v)
                                    <li @if($k % 2 == 0)class="list-left"@endif>
                                        <div><img src="{{asset($v->img)}}"></div>
                                        <div>
                                            <span><h3><a href="{{ route('news') }}?class={{ $v->id }}">{{ $v->defectsname }}</a></h3></span>
                                            <span><em>指数{{ $v->count }}</em></span>
                                        </div>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                    </div>

                    {{--second right info hot article--}}
                    <div class="title">
                        <span>热门文章</span>
                    </div>
                    <div class="article">
                        @if(!empty($hotNewsWithPic->imgUrl) )
                            <div class="article-img">
                                <a href="{{ route('newsinfo',['id'=>$v->id]) }}" target="_blank">
                                    <img src="{{asset($hotNewsWithPic->imgUrl)}}" alt="{{ $hotNewsWithPic->title }}" title="{{ $hotNewsWithPic->title }}">
                                </a>
                            </div>
                        @endif
                        <div class="article-list">
                            <ul>
                                @if(count($hotNews) > 0)
                                    @foreach($hotNews as $v)
                                        <li><a href="{{ route('newsinfo',['id'=>$v->id]) }}" target="_blank">{{ msubstr($v->title,0,23) }}</a></li>
                                    @endforeach
                                @endif
                            </ul>
                        </div>
                    </div>
                </div>{{--end second right--}}
            </div>
        </div> {{--end 内容显示--}}

    </div>
    <div class="vicebuttom"></div>
    @endsection
@section('insert_js')
    <script type="text/javascript">
        $(function(){
            $("#newsForm").find("em").click(function(){
                if($("#newsForm").find('input').eq(1).val() == ''){
                    $("#newsForm").find('input').focus();
                    return false;
                }else{
                    $("#newsForm").submit();
                }
            });
        });
    </script>
@endsection